package com.gzhryc.net_marketing.cloud.goods.dao.enums;

public class GoodsEnum {

	public static enum State {

		PutOnTheShelf(1, "上架"),OffTheShelf(2, "下架"), NoInventory(3, "无库存");

		private Integer index;
		private String note;

		State(Integer index, String note) {
			this.index = index;
			this.note = note;
		}

		public Integer index() {
			return index;
		}

		public String note() {
			return note;
		}

		public static String note(Integer index) {
			State[] temp = State.values();
			for (int i = 0; i < temp.length; i++) {
				State item = temp[i];
				if (item.index.equals(index)) {
					return item.note;
				}
			}
			return null;
		}
	}
	
	public static enum SourceType {

		Shelf(1, "自有"),Supply(2, "供货商");

		private Integer index;
		private String note;

		SourceType(Integer index, String note) {
			this.index = index;
			this.note = note;
		}

		public Integer index() {
			return index;
		}

		public String note() {
			return note;
		}

		public static String note(Integer index) {
			SourceType[] temp = SourceType.values();
			for (int i = 0; i < temp.length; i++) {
				SourceType item = temp[i];
				if (item.index.equals(index)) {
					return item.note;
				}
			}
			return null;
		}
	}
}
